var e = require("../../@babel/runtime/helpers/interopRequireWildcard");
Object.defineProperty(exports, "__esModule", { value: !0 }),
  (exports.encryptFeature = u),
  (exports.encryptReqPacket = function (e, r, t, a) {
    var s = Date.now(),
      o = u(t, "01303975070694866490574863106155", !1),
      c = (0, n.getLocal)(a),
      l = 1;
    if ((0, i.isEmpty)(c)) {
      (c = u(o, s - ((s + 288e5) % 864e5))), (l = 0);
    }
    return {
      req: {
        content: (e = u((e = JSON.stringify(e)), o, !1)),
        channel: r + "",
        token: c,
        version: "1",
        type: l + "",
        timestamp: s + "",
      },
    };
  });
var r = e(require("../utils/xxtea_new")),
  t = e(require("../utils/base64")),
  i = require("../utils/util"),
  n = require("./local");
function u(e, n, u) {
  if ((0, i.isEmpty)(e)) return e;
  u && (e = e + "_" + new Date().valueOf());
  var a = r.encrypt(e + "", n + "");
  return t.base64Encode(a);
}
